//
//  ZCShareTool.h
//  ZCShareSDK
//
//  Created by YZC on 2024/12/26.
//

#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
#import "ThirdAuthUserInfo.h"

NS_ASSUME_NONNULL_BEGIN

@interface ZCShareTool : NSObject

// 设置key
+ (void)setSDK_key:(NSString *)sdk_key;
// 配置友盟 appkey
+ (void)configureInitUMShare:(NSString *)um_key;
// 配置通用链接
+ (void)configureUniversalLinkWithWechatLink:(NSString *)wechatLink qqLink:(NSString *)qqLink sinaLink:(NSString *)sinaLink;
// 配置分享微信平台appkey secret等
+ (void)configure_UMShare_WechatPlatformInfo:(NSString *)appkey secret:(NSString *)secret redirectURL:(NSString *)redirectURL;
// 配置分享QQ平台appkey secret等
+ (void)configure_UMShare_QQPlatformInfo:(NSString *)appkey secret:(NSString *)secret redirectURL:(NSString *)redirectURL;
// 配置分享微博平台appkey secret等
+ (void)configure_UMShare_SinaWeiboPlatformInfo:(NSString *)appkey secret:(NSString *)secret redirectURL:(NSString *)redirectURL;
// 分享网页
+ (void)share_web:(UIViewController *)vc platform:(NSString *)platform title:(NSString *)title description:(NSString *)description thumbFilePath:(NSString *)thumbFilePath url:(NSString *)url callBack:(void(^ __nullable)(NSString *status, NSString *_Nullable msg))callback;
// 分享图片
+ (void)share_image:(UIViewController *)vc platform:(NSString *)platform imagePath:(NSString *)imagePath callBack:(void(^ __nullable)(NSString *status, NSString *_Nullable msg))callback;
// 分享文本
+ (void)share_text:(UIViewController *)vc platform:(NSString *)platform text:(NSString *)text callBack:(void(^ __nullable)(NSString *status, NSString *_Nullable msg))callback;
// 分享网络视频
+ (void)share_video:(UIViewController *)vc platform:(NSString *)platform title:(NSString *)title description:(NSString *)description thumbFilePath:(NSString *)thumbFilePath videoUrl:(NSString *)videoUrl callBack:(void(^ __nullable)(NSString *status, NSString *_Nullable msg))callback;
// 分享音乐
+ (void)share_music:(UIViewController *)vc platform:(NSString *)platform title:(NSString *)title description:(NSString *)description thumbFilePath:(NSString *)thumbFilePath musicUrl:(NSString *)musicUrl mTargetUrl:(NSString * _Nullable )mTargetUrl callBack:(void(^ __nullable)(NSString *status, NSString *_Nullable msg))callback;
// 判断平台是否安装
+ (BOOL)isInstall:(NSString *)platform;
// 第三方登录 微信QQ微博授权
+ (void)thirdAuthLoginGetUserInfo:(UIViewController *)vc platform: (NSString *) platform callBack:(void(^ __nullable)(BOOL success,  ThirdAuthUserInfo * _Nullable userInfo,  NSString * _Nullable msg))callBack;

/**
 *  获得从sso或者web端回调到本app的回调
 *
 *  @param url               第三方sdk的打开本app的回调的url
 *  @param sourceApplication 回调的源程序
 *  @param annotation        annotation
 *
 *  @return 是否处理  YES代表处理成功，NO代表不处理
 *
 *  @note 此函数在6.3版本加入
 */
+ (BOOL)handleOpenURL:(NSURL *)url sourceApplication:(NSString * _Nullable )sourceApplication annotation:(id)annotation;
/**
 *  获得从sso或者web端回调到本app的回调
 *
 *  @param url 第三方sdk的打开本app的回调的url
 *
 *  @return 是否处理  YES代表处理成功，NO代表不处理
 */
+ (BOOL)handleOpenURL:(NSURL *)url;
/**
 *  获得从sso或者web端回调到本app的回调
 *
 *  @param url     第三方sdk的打开本app的回调的url
 *  @param options 回调的参数
 *
 *  @return 是否处理  YES代表处理成功，NO代表不处理
 *
 *  @note 此函数在6.3版本加入
 */
+ (BOOL)handleOpenURL:(NSURL *)url options:(NSDictionary* _Nullable)options;
/**
 *  UniversalLink回调到本app的回调
 *
 *  @param userActivity  NSUserActivity的入参
 *  @param  options       可选的信息，目前传入nil
 *
 *  @return 是否处理  YES代表处理成功，NO代表不处理
 *  @note 6.9.7版本加入
 */
+ (BOOL)handleUniversalLink:(id)userActivity options:(NSDictionary* _Nullable)options;
//+ (BOOL)handleUniversalLink:(id)userActivity options:(NSDictionary* _Nullable)options platform:(UMSocialPlatformType)platformType;


+ (void)testAFunctionWithCallBack:(void(^)(void))callBack;

+ (void)testA1FunctionWithCallBack:(void(^)(void))callBack;

+ (void)testCFunctionWithCallBack:(void(^)(void))callBack;

+ (void)testC1FunctionWithCallBack:(void(^)(void))callBack;

@end

NS_ASSUME_NONNULL_END
